import cv2 as cv
import numpy as np

# author: 陶辰龙
# 图像去噪声

def denoise(image):
    return cv.fastNlMeansDenoisingColored(image, None, 10, 10, 7, 21)


# 测试
if __name__ == "__main__":
    src = cv.imread("test.jpg")
    cv.imshow("raw", src)  # 原图
    cv.imshow("denoise", denoise(src))  # 去噪声
    cv.waitKey(0)
    cv.destroyAllWindows()
